this.BX=this.BX||{};this.BX.Landing=this.BX.Landing||{};this.BX.Landing.UI=this.BX.Landing.UI||{};(function(t,e,n){"use strict";function i(){var t=babelHelpers.taggedTemplateLiteral(['\n\t\t\t<div class="landing-ui-form-cards-item">\n\t\t\t\t<div class="landing-ui-form-cards-item-inner">\n\t\t\t\t\t<div class="landing-ui-form-card-item-header" onclick="','">\n\t\t\t\t\t\t<div class="landing-ui-form-card-item-header-left">\n\t\t\t\t\t\t\t<div class="landing-ui-form-card-item-header-left-inner">\n\t\t\t\t\t\t\t\t<span class="landing-ui-form-card-item-header-drag landing-ui-drag"></span>\n\t\t\t\t\t\t\t\t<span class="landing-ui-form-card-item-header-title">','</span>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t\t<div class="landing-ui-form-card-item-header-edit">\n\t\t\t\t\t\t\t\t<span class="fa fa-pencil"></span>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t\t<div class="landing-ui-form-card-item-header-right">\n\t\t\t\t\t\t\t<div \n\t\t\t\t\t\t\t\tclass="landing-ui-form-card-item-header-remove"\n\t\t\t\t\t\t\t\tonclick="','"\n\t\t\t\t\t\t\t>\n\t\t\t\t\t\t\t\t<span class="fa fa-remove"></span>\n\t\t\t\t\t\t\t</div>\n\t\t\t\t\t\t</div>\n\t\t\t\t\t</div>\n\t\t\t\t\t',"\n\t\t\t\t</div>\n\t\t\t</div>\n\t\t"]);i=function e(){return t};return t}var a=function(t){babelHelpers.inherits(n,t);function n(t){var i;babelHelpers.classCallCheck(this,n);i=babelHelpers.possibleConstructorReturn(this,babelHelpers.getPrototypeOf(n).call(this,t));i.setEventNamespace("BX.Landing.UI.Form.CardForm");e.Dom.addClass(i.layout,"landing-ui-form-card");i.onItemClick=e.Runtime.throttle(i.onItemClick,200,babelHelpers.assertThisInitialized(i));i.onRemoveItemClick=i.onRemoveItemClick.bind(babelHelpers.assertThisInitialized(i));i.wrapper=i.getWrapper();i.labelBindings=t.labelBindings;i.preset=t.preset;var a=i.selector.split("@");var r=babelHelpers.slicedToArray(a,2);i.oldIndex=r[1];return i}babelHelpers.createClass(n,[{key:"getWrapper",value:function t(){return e.Tag.render(i(),this.onItemClick,this.label,this.onRemoveItemClick,this.getNode())}},{key:"onItemClick",value:function t(n){n.preventDefault();if(e.Type.isDomNode(n.currentTarget)){var i=n.currentTarget.closest(".landing-ui-form-cards-item");if(!e.Dom.hasClass(i,"landing-ui-form-cards-item-expand")){e.Dom.addClass(i,"landing-ui-form-cards-item-expand");BX.Landing.Utils.onTransitionEnd(i).then(function(){e.Dom.style(i,{overflow:"visible"})});e.Dom.style(i,{height:"auto"})}else{e.Dom.removeClass(i,"landing-ui-form-cards-item-expand");e.Dom.style(i,null)}}}},{key:"onRemoveItemClick",value:function t(n){n.preventDefault();n.stopPropagation();if(!this.getLayout().closest(".landing-ui-disallow-remove")){e.Dom.remove(this.wrapper);this.emit("onRemove")}}},{key:"serialize",value:function t(){return this.fields.reduce(function(t,e){var n=e.selector.split("@"),i=babelHelpers.slicedToArray(n,1),a=i[0];t[a]=e.getValue();return t},{})}},{key:"getPreset",value:function t(){return this.preset||null}}]);return n}(n.BaseForm);t.CardForm=a})(this.BX.Landing.UI.Form=this.BX.Landing.UI.Form||{},BX,BX.Landing.UI.Form);
//# sourceMappingURL=cardform.bundle.map.js